﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using TMDT_Nhom1A.DTO;
using TMDT_Nhom1A.DAO;

namespace TMDT_Nhom1A.BUS
{
    public class Coupon_BUS
    {
        public static List<COUPON> ListCouponByElectricDeviceID(string ElectricDeviceID)
        {
            return Coupon_DAO.ListCouponByElectricDeviceID(ElectricDeviceID);
        }

        public static void UpdateStatusCoupon(string Coupon_ID, int Status)
        {
            Coupon_DAO.UpdateStatusCoupon(Coupon_ID, Status);
        }

        public static COUPON DetailCoupon(string Coupon_ID)
        {
            return Coupon_DAO.DetailCoupon(Coupon_ID);
        }

        public static void UpdateCoupon(COUPON coupon)
        {
            Coupon_DAO.UpdateCoupon(coupon);
        }

        public static void InsertCoupon(COUPON coupon)
        {
            Coupon_DAO.InsertCoupon(coupon);
        }

        public static void GetPriceCouponOfElectricDevice(string ElectricDevice_ID, ref string NonDiscountPrice, ref string DiscountPrice)
        {
            Coupon_DAO.GetPriceCouponOfElectricDevice(ElectricDevice_ID, ref NonDiscountPrice, ref DiscountPrice);
        }

        public static List<OrderCoupon> GetAllOrderCoupon()
        {
            return Coupon_DAO.GetAllOrderCoupon();
        }

        public static bool UpdateStatusColumnOrderCoupon(string orderCouponID, short status)
        {
            return Coupon_DAO.UpdateStatusColumnOrderCoupon(orderCouponID, status);
        }
    }
}
